/**
 * 此处可直接引用自己项目封装好的 axios 配合后端联调
 */
import request from "@/service/request";

/**
 * 获取验证图片  以及token
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqGet(data) {
  return request({
    url: "/captcha/getBehaviorCaptcha",
    method: "post",
    // 不检查重复提交
    headers: {
      repeatSubmit: false,
    },
    data,
  });
}

/**
 * 滑动或者点选验证
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqCheck(data) {
  return request({
    url: "/captcha/checkBehaviorCaptcha",
    method: "post",
    data,
  });
}
